define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'benefit.well_number/index',
        add_url: 'benefit.well_number/add',
        edit_url: 'benefit.well_number/edit',
        delete_url: 'benefit.well_number/delete',
        export_url: 'benefit.well_number/export',
        modify_url: 'benefit.well_number/modify',
        recycle_url: 'benefit.well_number/recycle',
    };

    return {

        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh','export'],
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: 'id',width:80,search:false},
                    {field: 'well_number', title: '井号'},
                    {field: 'start_date', title: '开工日期',search:false},
                    {field: 'end_date', title: '完工日期',search :"range-date",timeType:'date'},
                    {field: 'work_type', title: '工作类别',search:false},
                    {field: 'file', title: '来源文件'},
                    {width: 250, title: '操作', templet: ea.table.tool},

                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        }
    };
});